<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>用户中心-{$tpshop_config['shop_info_store_title']}</title>
    <meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
    <meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
    <link rel="stylesheet" href="__STATIC__/css/index.css" type="text/css">
    <link rel="stylesheet" href="__STATIC__/css/security_set.css">
    <link rel="stylesheet" href="__STATIC__/css/btn.css">
    <script src="__STATIC__/js/jquery-1.10.2.min.js"></script>
    <script src="__STATIC__/js/slider.js"></script>
<link rel="stylesheet" href="__STATIC__/css/user.css" type="text/css">
</head>
<body>
<include file="Public/header" />

<div id="user_container">
	<div id="user_login">
		<div class="wel-log">设置新密码</div>
		
		<form action="" id="vi_form" method="post">
            <div class="login-x">
                <div>
                    <table class="pa-10-0" width="100%" border="0" cellspacing="0" cellpadding="0">
                       
                        <tr>
                            <td><input class="zc-text zc_p" name="password" id="password" type="password"  placeholder="新登录密码" onblur="checkpwd()"/></td>
                        </tr>
                        
                        
                        <tr>
                            <td><input class="zc-text zc_p" name="password2" id="password_repeat" type="password"  placeholder="请再次输入密码" onblur="checkpwd()"/></td>
                        </tr>
                        
                     
                        <tr>
                          
                            <td><input type="button" class="login" onClick="dosubmit()" value="下一步"><br ><br ><br ><br ></td>
                        </tr>
                    </table>
                </div>
            </div>
        </form>
	</div>
</div>


<div style="clear: both;"></div>
<include file="Public/footer" />
<script>
var flag1 = flag2 = false;
function checkpwd(){
	var password = $('#password').val();
	var password_repeat = $('#password_repeat').val();

	if(password == ''){
			$.artTip('密码不能为空', 800);
		return false;
	}else if(password.length<6 || password.length>16){
		
			$.artTip('密码长度必须为6-16位', 800);
		return false;
	}else{
		//$('span[data-tips-for="password"]').css('display','inline');
		//$('span[data-tips-for="password"]').find('i').removeClass('icon-warn');
		//$('span[data-tips-for="password"]').find('i').addClass('icon-loss');
		//$('span[data-tips-for="password"]').find('.txt').empty();
		flag1 = true;
	}
	
	if(password_repeat == ''){
			$.artTip('重复密码不能为空', 800);
		return false;
	}else if(password!=password_repeat){
			$.artTip('两次密码不一样', 800);
		return false;
	}else{
		//$('span[data-tips-for="password_repeat"]').css('display','inline');
		//$('span[data-tips-for="password_repeat"]').find('i').removeClass('icon-warn');
		//$('span[data-tips-for="password_repeat"]').find('i').addClass('icon-loss');
		//$('span[data-tips-for="password_repeat"]').find('.txt').empty();
		flag2 = true;
	}
	return (flag1 && flag2);
}

function show_error(type,msg){
	//$('span[data-tips-for="'+type+'"]').css('display','inline');
	//$('span[data-tips-for="'+type+'"]').find('i').removeClass('icon');
	//$('span[data-tips-for="'+type+'"]').find('i').removeClass('icon-loss');
	//$('span[data-tips-for="'+type+'"]').find('i').addClass('icon-warn');
	//$('span[data-tips-for="'+type+'"]').find('.txt').empty().html(msg);
}

function dosubmit(){
	if(checkpwd()){
		$('#vi_form').submit();
	}
}
</script>
</body>
</html>	